package cn.wolfcode.designpattern.flyweight;

/**
 * @author Leon
 * @date 2021/2/26
 */
public class Client {

    public static WolfPanServer server = new WolfPanServer();

    public static void main(String[] args) {
//        User root = new User("001", "root");
//        // 客户端与服务端建立连接
//        WolfPanClient client = new WolfPanClient("C001", server);
//        // 客户登录
//        client.login(root);
//
//        // 客户上传资源
//        LocalFile localFile = new LocalFile("设计模式.pdf", "16Mb");
//        client.upload(localFile);
//        System.out.println();
//        System.out.println("-------------------------- 分隔符 --------------------------");
//        System.out.println();
//        User admin = new User("002", "admin");
//        client.login(admin);
//        client.upload(localFile);
//        LocalFile localFile1 = new LocalFile("设计模式-1.pdf", "16.332Mb");
//        client.upload(localFile1);

        String str1 = "123";
        String str = new String("123");
        System.out.println(str == str1);
        System.out.println(str.intern() == str1);
        // Integer/Long
        Integer i = 128;
        Integer i1 = 128;
        System.out.println(i == i1);
    }
}
